/**
 * Bestpay.com.cn Inc.
 * Copyright (c) 2011-2019 All Rights Reserved.
 */
package com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory;

import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.factory.AbstractPizzaStore;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.factory.abstractFactory.CaliforniaStylePizzaStore;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.factory.abstractFactory.ChicagoStylePizzaStore;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.factory.abstractFactory.NYStylePizzaStore;
import com.suxiaoxiao.springbootlearn.designpattern.factorypattern.simplefactory.pizza.Pizza;

/**
 * 工厂模式测试
 *
 * @author zhaorongzhang
 * @version PizzaTestDrive.java, v 0.1 2019/12/29 1:49 下午 zhaorongzhang Exp $$
 */
public class PizzaTestDrive {

    public static void main(String[] args) {
        AbstractPizzaStore nyStore = new NYStylePizzaStore();
        AbstractPizzaStore chicagoStore = new ChicagoStylePizzaStore();
        AbstractPizzaStore californiaStore = new CaliforniaStylePizzaStore();

        Pizza pizza = nyStore.orderPizza("cheese");
        System.out.println("Ethan ordered a " + pizza.getName());

        Pizza pizza1 = chicagoStore.orderPizza("cheese");
        System.out.println("Ethan ordered a " + pizza1.getName());

        Pizza pizza2 = californiaStore.orderPizza("cheese");
        System.out.println("Ethan ordered a " + pizza2.getName());
    }

}